package cn.redragon.soa;

import java.util.TimeZone;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.retry.annotation.EnableRetry;

@SpringBootApplication(scanBasePackages = {"cn.redragon.soa", "cn.redragon.base"})
@EnableRetry
public class CrmApplication {

  @Value("${server.timeZone:#{T(java.time.ZoneId).systemDefault().getId()}}")
  private String timeZone;

  @PostConstruct
  void setDefaultTimeZone() {
    TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
  }

  public static void main(String[] args) {
    SpringApplication.run(CrmApplication.class, args);
  }


}
